Imports System.Xml.Serialization
Namespace Mapping

    Public Class FunctionImportMapping
        Inherits XEntityModelElementBase

        ''' <summary>Initializes an instance of the <see cref="FunctionImportMapping" /> class.</summary>
        ''' <param name="other">An <see cref="System.Xml.Linq.XElement"/> object to copy from.</param>
        Public Sub New(ByVal other As XElement)
            MyBase.New(other)
        End Sub

        Private __resultMapping As FunctionImportEntityTypeMappingCollection

        <XmlElement("EntityTypeMapping", IsNullable:=False)> _
        Public ReadOnly Property ResultMappings() As FunctionImportEntityTypeMappingCollection
            Get
                If (__resultMapping Is Nothing) Then
                    Dim name = MyBase.Name.Namespace + "ResultMapping"
                    Dim el = Me.Element(name)
                    If (el Is Nothing) Then
                        el = New XElement(name)
                        Me.Add(el)
                    End If
                    __resultMapping = New FunctionImportEntityTypeMappingCollection(el, "EntityTypeMapping")
                End If
                Return __resultMapping
            End Get
        End Property

        <XmlAttribute()> _
        Public Property FunctionName() As String
            Get
                Return Me.@FunctionName
            End Get
            Set(ByVal value As String)
                Me.@FunctionName = value
            End Set
        End Property

        <XmlAttribute(DataType:="token")> _
        Public Property FunctionImportName() As String
            Get
                Return Me.@FunctionImportName
            End Get
            Set(ByVal value As String)
                Me.@FunctionImportName = value
            End Set
        End Property

    End Class

End Namespace